﻿<!-- #include file="mymin.asp" -->
<%
Function forQuote_(str)
	str = Replace(str,"，",",")
	forQuote_ = str
End Function

Function checkQuote_(str)
	Set re=New regexp
	' re.IgnoreCase =True
	re.Global=True
	re.Pattern="^-?\d+,-?\d+,-?\d+$"
	checkQuote_=re.Test(str)
	Set re=Nothing
End Function

Sub Error_(str)
	Call Error2("<title>出错</title></head><body><div class=""main400"">"""&str&"""积分规则无效！格式为1,1,1 (不能有小数)")
End Sub

If Request.form("submit1") <> "" Then

	amtArt=forQuote_(Request.Form("amtArt"))
	If Not checkQuote_(amtArt) Then Call Error_("阅读文章")
	amtPosts=forQuote_(Request.Form("amtPosts"))
	If Not checkQuote_(amtPosts) Then Call Error_("阅读帖子")
	amtPost=forQuote_(Request.Form("amtPost"))
	If Not checkQuote_(amtPost) Then Call Error_("发布帖子")
	amtPostD=forQuote_(Request.Form("amtPostD"))
	If Not checkQuote_(amtPostD) Then Call Error_("删除帖子")
	amtPostGood=forQuote_(Request.Form("amtPostGood"))
	If Not checkQuote_(amtPostGood) Then Call Error_("加精华帖")
	amtPostGoodD=forQuote_(Request.Form("amtPostGoodD"))
	If Not checkQuote_(amtPostGoodD) Then Call Error_("取消精华")
	amtReply=forQuote_(Request.Form("amtReply"))
	If Not checkQuote_(amtReply) Then Call Error_("回复帖子")
	amtComment=forQuote_(Request.Form("amtComment"))
	If Not checkQuote_(amtComment) Then Call Error_("评论文章")
	amtEssay=forQuote_(Request.Form("amtEssay"))
	If Not checkQuote_(amtEssay) Then Call Error_("会员投稿")
	amtSign=forQuote_(Request.Form("amtSign"))
	If Not checkQuote_(amtSign) Then Call Error_("每日签到")
	amtSign7=forQuote_(Request.Form("amtSign7"))
	If Not checkQuote_(amtSign7) Then Call Error_("7天签到")
	amtAd=forQuote_(Request.Form("amtAd"))
	If Not checkQuote_(amtAd) Then Call Error_("广告送币")
	amtReg=forQuote_(Request.Form("amtReg"))
	If Not checkQuote_(amtReg) Then Call Error_("注册送币")

	'----------------------------------------------------------------
	'	生成 amount.asp 文件
	'----------------------------------------------------------------
	dim HU_Config,HU_File

	HU_File= "../../config/amount.asp"'生成 amount.asp 文件路径

	HU_Config="<"&"%' 不建议手动编辑"
	HU_Config=HU_Config+chr(13)&chr(10)&"amtReg="""&amtReg&""" '注册送币"
	HU_Config=HU_Config+chr(13)&chr(10)&"amtSign="""&amtSign&""" '每日签到"
	HU_Config=HU_Config+chr(13)&chr(10)&"amtSign7="""&amtSign7&""" '7天签到"
	HU_Config=HU_Config+chr(13)&chr(10)&"amtArt="""&amtArt&""" '阅读文章"
	HU_Config=HU_Config+chr(13)&chr(10)&"amtComment="""&amtComment&""" '评论文章"
	HU_Config=HU_Config+chr(13)&chr(10)&"amtEssay="""&amtEssay&""" '会员投稿"
	HU_Config=HU_Config+chr(13)&chr(10)&"amtPosts="""&amtPosts&""" '阅读帖子"
	HU_Config=HU_Config+chr(13)&chr(10)&"amtPost="""&amtPost&""" '发布帖子"
	HU_Config=HU_Config+chr(13)&chr(10)&"amtReply="""&amtReply&""" '回复帖子"
	HU_Config=HU_Config+chr(13)&chr(10)&"amtPostD="""&amtPostD&""" '删除帖子"
	HU_Config=HU_Config+chr(13)&chr(10)&"amtPostGood="""&amtPostGood&""" '加精华帖"
	HU_Config=HU_Config+chr(13)&chr(10)&"amtPostGoodD="""&amtPostGoodD&""" '取消精华"
	HU_Config=HU_Config+chr(13)&chr(10)&"amtAd="""&amtAd&""" '广告送币"
	HU_Config=HU_Config+chr(13)&chr(10)&"%"&">"
	Call savetofile(HU_Config,HU_File)
	Response.Write "<meta http-equiv=""refresh"" content=""1;url=index.asp?sid="&sid&"""><title></title></head><body><div class=""main320"">"
	Response.Write "成功设置！正在返回..."
else

%>
<title>网站积分配置</title></head><body><div class="main400">
<form method="post" action="amount.asp">
<table>
<tr><td>注册送币</td><td><input name="amtReg" type="text" value="<%=amtReg%>"/></td></tr>
<tr><td>每日签到</td><td><input name="amtSign" type="text" value="<%=amtSign%>"/></td></tr>
<tr><td>7天签到</td><td><input name="amtSign7" type="text" value="<%=amtSign7%>"/></td></tr>
<tr><td>阅读文章</td><td><input name="amtArt" type="text" value="<%=amtArt%>"/></td></tr>
<tr><td>评论文章</td><td><input name="amtComment" type="text" value="<%=amtComment%>"/></td></tr>
<tr><td>会员投稿</td><td><input name="amtEssay" type="text" value="<%=amtEssay%>"/></td></tr>
<tr><td>阅读帖子</td><td><input name="amtPosts" type="text" value="<%=amtPosts%>"/></td></tr>
<tr><td>发布帖子</td><td><input name="amtPost" type="text" value="<%=amtPost%>"/></td></tr>
<tr><td>回复帖子</td><td><input name="amtReply" type="text" value="<%=amtReply%>"/></td></tr>
<tr><td>删除帖子</td><td><input name="amtPostD" type="text" value="<%=amtPostD%>"/></td></tr>
<tr><td>加精华帖</td><td><input name="amtPostGood" type="text" value="<%=amtPostGood%>"/></td></tr>
<tr><td>取消精华</td><td><input name="amtPostGoodD" type="text" value="<%=amtPostGoodD%>"/></td></tr>
<tr><td>广告送币</td><td><input name="amtAd" type="text" value="<%=amtAd%>"/></td></tr>
</table>
<input type="submit" value="保存配置"/>
<input type="hidden" name="submit1" value="1"/>
<input type="hidden" name="sid" value="<%=sid%>"/>
</form>
温馨提示:<br/>
1、积分规则分别为金币,积分,经验<br/>
2、智能防刷,间隔过短没有积分经验<br/>
3、7天签到:需要7天以上连续签到<br/>
4、广告送币:重复点同一广告没有积分<br/>
<%end if%><br/>
<a href="index.asp?sid=<%=sid%>">[网站配置]</a><%call Last2%>